﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SuperMicroWave.Common
{
    public class ConnectInfo
    {
        public struct HRegData
        {
            public ushort R0;
            public ushort R1;
            public ushort R2;
            public ushort R3;
            public ushort R4;
            public ushort R5;
            public ushort R6;
            public ushort R7;
            public ushort R8;
        }

        public struct SysParams
        {
            public string MethodName;
            public string MethodFilePath;

            public double PreScale;
            public double StabScale;
            public int StabTime;
            public double LeakV;

            public double AutoCleanPreMax;
            public double AutoCleanPreMin;
        }

        /// <summary>
        /// 仪器状态
        /// </summary>
        public enum InsState
        {
            /// <summary>
            /// 空闲
            /// </summary>
            DEV_IDLE = 0,
            /// <summary>
            /// 升温
            /// </summary>
            DEV_HEAT = 1,
            /// <summary>
            /// 暂停
            /// </summary>
            DEV_PAUSE = 0xff,
            /// <summary>
            /// 掉线
            /// </summary>
            DEV_ERROR = 2
        }

        public struct NowState
        {
            public InsState CurState;  //当前仪器状态
            public InsState LastState;  //上一刻仪器状态

            public bool IsAutoClean;   //当前方法是否为自动清洗    

            /// <summary>
            /// 罐内温度
            /// </summary>
            public double T;
            /// <summary>
            /// 磁控管温度
            /// </summary>
            public double T1;
            /// <summary>
            /// 压力
            /// </summary>
            public double P1;
            /// <summary>
            /// 功率输出
            /// </summary>
            public double P2;
        }
    }
}
